package cn.sso.app.client.api;

import cn.ifloat.brick.basic.common.results.PageRequester;
import cn.ifloat.brick.basic.common.results.PageRequesterFormCondition;
import cn.ifloat.brick.basic.common.results.PageResult;
import cn.sso.app.client.example.domain.Project;
import cn.sso.app.client.example.vo.ProjectVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author: float 2023/1/17 11:12
 * 项目接口
 */
public interface ProjectApi {

    @PostMapping("/demo/project/pager")
    PageResult<Project> pager(@RequestBody PageRequester<Project> requester);

    @PostMapping("/demo/project/vo/pager")
    PageResult<ProjectVo> pagerVo(@RequestBody PageRequester<ProjectVo> requester);

    @PostMapping("/demo/project/condition/pager")
    PageResult<Project> pagerCondition(@RequestBody PageRequesterFormCondition<Project> requester);


    @GetMapping("/demo/project/get")
    ProjectVo get(Long id);

    @PostMapping("/demo/project/list")
    List<Project> list(@RequestBody Project project);

    @PostMapping("/demo/project/list/vo")
    List<ProjectVo> listVo(@RequestBody ProjectVo vo);

    @PostMapping("/demo/project/save")
    void save(@RequestBody ProjectVo vo);

    @PostMapping("/demo/project/update")
    void update(@RequestBody ProjectVo vo);

    @PostMapping("/demo/project/update/all")
    void updateAll(@RequestBody ProjectVo vo);

}
